import random

fruits = ['apple', 'banana', 'orange']

for index,fruit in enumerate(fruits):
    print(f'第{index+1}个元素是：{fruit}')

# for v in fruits:
#     print(f'{v}')

students = ['张三', '李四', '王五']
for s,st in enumerate(students,start=1):
    print(f'第{s}个学生是：{st}')

scores = [80, 90, 70, 60, 100]
for k,score in enumerate(scores):
    if k%2 == 0:
        scores[k] = score + 5
print( scores)

colors = ['red', 'blue', 'green', 'blue', 'yellow']
blue_positions = [index for index, color in enumerate(colors) if color == 'blue']
print(blue_positions)
# 输出：[1, 3]

num_list = [item for item in range(10,20) ]
print(num_list)

int_list = [random.randint(1,100)  for _ in range(10)]
print(int_list)